<?php
namespace app\admin\controller;


class Slide extends Base
{
    public function lists()
    {
        $this->_list("slide",['cms_id'=> $this->cms['id']],"sort asc,id asc");
        return view();
    }

    public function edit()
    {
        $data=['cms_id'=>$this->cms['id']];
        $img=$this->qiniuupload();
        if($img!=null){
            $data['img']=$img;
        }
        if($this->_edit("slide",$data)){
            $this->redirect("slide/lists");
        };
        return view();
    }
    public function delete()
    {
        $this->_delete("slide",['cms_id'=> $this->cms['id'],"id"=>input("get.id")],"slide/lists");
    }

}
